<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
</body>
</html>
<script>
    var txt = "abcdefg";
    var txt1 = "今天是星期天";
    alert(txt.charAt(5));
    alert(txt1.charAt(3));
    alert(txt.charCodeAt(0));
    alert(txt1.charCodeAt(3));
</script>